<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    class Phone{
        get price(){
            console.log('价格属性被读取了')
            return 'iloveyou'
        }
        set price(newVal){
            console.log('价格属性被修改')
        }
    }
    let s=new Phone()
    s.price='free'
    console.log(s.price)
</script>
</body>
</html>
